﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Milkify.Interfaces
{
    public static class IViewExtensions
    {
        private static IViewFactory mViewFactory;
        private static IViewFactory ViewFactory
        {
            get
            {
                if (mViewFactory == null)
                    mViewFactory = KernelContainer.Kernel.Get<IViewFactory>();
                return mViewFactory;
            }
        }

        public static string GetName(this IView view)
        {
            return ViewFactory.GetViewName(view);
        }
    }
}
